﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmartMD.DataModel.Entity
{
    /** 
 * <p>类说明:标本使用记录</p>
 * @version 1.0
 * <p>文件名： </p>
 * <p>创建人及时间： xiangyuliang 2011-8-27</p>
 * <p>修改人：</p>
 * <p>修改时间：</p>
 * <p>修改描述：</p>
 **/

    public class SpecUsage : BusinessEntity
    {
        //public string id { get; set; }          //标识
        private string _recordId;   //记录标识
        private string _user;        //使用人
        private DateTime _useTime;  //使用时间
        private string _purpose;    //用途

        public override void setValue(string key, Object value)
        {
            if (value is System.DBNull)
                return;
            switch (key.ToLower())
            {
                case "recordid":
                    this.Id = (string)value;
                    break;
                case "usr":
                    this.User = (string)value;
                    break;
                case "usetime":
                    this.UseTime = DateTime.Parse( (string)value);
                    break;
                case "purpose":
                    this.Purpose = (string)value;
                    break;
            }
        }

        public String User
        {
            get
            {
                return _user;
            }
            set
            {
                _user = value;
                OnPropertyChanged(() => User);
            }
        }
        [CheckValue("标本记录定义“使用时间”不能为空")]
        public DateTime UseTime
        {
            get
            {
                return _useTime;
            }
            set
            {
                _useTime = value;
                OnPropertyChanged(() => UseTime);
            }
        }
        [CheckValue("标本记录定义“用途”不能为空")]
        public String Purpose
        {
            get
            {
                return _purpose;
            }
            set
            {
                _purpose = value;
                OnPropertyChanged(() => Purpose);
            }
        }
    
    }

   
}
